-- fifa22_ng_net_physics_v0_2.lua
-- FIFA 22 Next-Gen Next Physics Version 0.2.
-- Values by DevPlays & PetiTheOnlyOne (Through Durandil67's Live Nets Editor {nets.lua})
-- Memory Address mapping by DevPlays
-- Researched by Durandil67 (Nets Module)

local m = { version = "1.0" }

function m.init(ctx)
    local addr = memory.search_process("\xcd\xcc\xcc\x3d\x33\x33\x73\x3f\x00\x00\xc0\x40\x00\x00\x80\x3f\x00\x00\x20\x41\x00\x00\x48\x42\x6f\x12\x83\x3a\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3e\xcd\xcc\xcc\x3d\xcd\xcc\x4c\x3d\x00\x00\x80\x3e\x00\x00\x80\x3f\xcd\xcc\x4c\x3f\x00\x00\x80\x3f\x00\x00\xc8\x42\x00\x00\x20\x41\x00\x00\x20\x41\x00\x00\x80\x3f\x17\xb7\xd1\x38\x6f\x12\x83\x3a\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x33\x33\x73\x3f")
    if addr then
        log(string.format("found magic string at: %s", memory.hex(addr)))
        memory.write(addr, "\x29\x5c\x0f\x3d\x1b\x0d\x80\x3f\x66\x66\x86\x3f\x66\x66\x66\x3f\x00\x00\x20\x41\x00\x00\x48\x42\x6f\x12\x83\x3a\x00\x00\x00\x00\x00\x00\xf0\x41\x47\x03\x80\x3f\x62\x10\x80\x3f\x9a\x99\x99\x3e\xae\x47\xe1\x3d\xcd\xcc\x0c\x3f\x9a\x99\x99\x3e\xc5\x20\x80\x3f\xcd\xcc\x4c\x3f\x00\x00\x80\x3f\x00\x00\xc8\x42\x00\x00\x20\x41\x00\x00\x20\x41\x00\x00\x80\x3f\x17\xb7\xd1\x38\x6f\x12\x83\x3a\x00\x00\x80\x3f\x00\x00\x80\x3f\x00\x00\x80\x3f\x33\x33\x73\x3f")
        log("nets_02")
    else
        error("unable to find magic string")
    end
end

return m
